﻿namespace Pumpkin.FrameBase.DownLoader
{
    public class DownloadModule : FrameModuleBase
    {
        public const string EventDownloadProcessing = "updateProcessing";
        public const string EventDownloadBeginNotify = "updateBegin";
        private UpdateWorkflow updateFlow;
        public override string GetName()
        {
            return "DownloadModule";
        }

        public override void Init()
        {
            updateFlow = new UpdateWorkflow();
            updateFlow.SetModule(this);
            updateFlow.Startup();
        }

        public override void Dispose()
        {
            updateFlow = null;
            RemoveAllEvents();
            FrameModuleMgr.Instance.RemoveModule(this);
        }
    }
}
